<template>
<div class="page" data-name="public-parking-lot-list">
  <div class="navbar">
    <div class="navbar-inner">
      <div class="left">
      </div>
      <div class="title">
      	购物车
      </div>
      <div class="right">
      </div>
    </div>
  </div>
  <div class="page-content" style="padding-bottom:100px;">
		<div class="cart-product-container">
				
		</div>	
		<div class="goPaybtn" >
			<a  class="button button-fill button-big color-orange right payBtn">结算</a>
  		</div>
  </div>
</template>


<script>

  


  return {
    data: function () {
    	 var lotBatchListResult = [];
      return {
    	  lotBatchList: lotBatchListResult
      };
    },
  	on:{
  		 pageInit: function () {
  	        self = this;
  	        app = self.$app;
  	        var fruits = self.fruits;
			  	        
  	        //远程获取购物车内商品信息
  	        shop_goods = [
	           	{storeName:"测试店铺1",storeId:1,products:[{storeId:1,productId:1,img:"img/f7-icon.png",price:"100",currency:"$",quantity:1},{storeId:1,productId:2,img:"img/f7-icon.png",price:"200",currency:"$",quantity:1}]},
	           	{storeName:"测试店铺2",storeId:2,products:[{storeId:2,productId:1,img:"img/f7-icon.png",price:"300",currency:"$",quantity:2},{storeId:2,productId:1,img:"img/f7-icon.png",price:"400",currency:"$",quantity:1}]},
          	];
  	      	initCart();
  	      	
  	      	$$(".payBtn").on("click",function(){
  	      		select_goods = [];
  	      		$$('input[name="cartProduct"]:checked').each(function(){
  	      			 var selectValue = $$(this).val();
  	      			 var item = selectValue.split("-");
  	      			 select_goods.push({storeId:item[0],productId:item[1]});
  	      		});
  	      		if(select_goods.length>0){
  	      			cartView.router.navigate("/order/confirm",{force:true,history:true});
  	      		}else{
					app.dialog.alert("请选择结算产品");  	      			
  	      		}
  	      	});
  		 }
  	}
	
  };
</script>
